Dat-aided frequency offset detection using phase unwrapping

ABSTRACT

A method of detecting frequency errors in a receiver during frame synchronization. A fast synchronization and reliable reception of the data requires a fast determination of frequency errors in the received signal. In CPFSK and OFDM, the frequency offset is even more important because of potential subcarrier interference. The method operates in the time domain and removes the 2p limitation in the phase representation by an unwrap function allowing a precise frequency determination.

The invention relates to correction of frequency errors in a radiocommunications system comprising at least one transmitter and onereceiver.

The signal received by the receiver is a complex signal which istypically coded in some manner. The invention is particularly expedientin connection with OFDM signals, but is also useful in connection withother coding principles, e.g. CPFSK. The invention will be describedbelow with reference to OFDM signals.

OFDM symbols are block-based signals which can be transmitted via aframe. The start of such a frame needs to be detected accurately, themethod of detecting the proper time instant to start sampling of a newOFDM frame being called “frame synchronization”. A commonly used way ofacquiring frame synchronization comprises inserting some synchronizationsymbols within the OFDM symbols (pilot symbols) and at the start of anew frame (preamble symbols). The preamble symbols can be used by thereceiver to generate the necessary timing for the OFDM framesynchronization and to correct frequency inaccuracy (carrier frequencyoffset). This carrier frequency offset can be introduced by i.e.non-perfect down-mixing of the RF part, Doppler effect and non-perfectdemodulation. The carrier frequency offset may also be due to inaccuracyof the local oscillator in the transmitter and the receiver. The carrierfrequency offset introduces InterCarrier Interference (ICI) in OFDMsystems, because signal components from one subcarrier causeinterference in neighboring subcarriers. The subcarrier orthogonality,of which the OFDM signals are assembled, is not maintained anymorethrough this ICI, and the system performance will degrade. Thesubchannel bandwidth or intercarrier spacing of an OFDM signal is muchsmaller than the signal bandwidth of the OFDM signal. A small frequencyoffset in the OFDM system leads to a substantial degradation of theSignal to Noise Ratio (SNR). Thus, there are many good reasons forcorrecting frequency errors as quickly and accurately as possible.

Various methods of correcting phase or frequency errors within OFDMsignals are known, and reference may be made e.g. to European PatentApplications 1 028 564 and 795 985 as well as WO 98/00946.

The technique disclosed in WO 98/00946 exclusively operates in thefrequency domain, that is after a fast Fourier transform (FET) has beenperformed on the incoming signal. The above-mentioned European patentapplications disclose a mixed technique allowing the error to becorrected in the time domain, but the information necessary to correctthe error can only be obtained after FFT. This may cause problems as tohow fast the correction can be performed. A frequent drawback is thataccurate time synchronization is required for the FFT operation. Afurher drawback is that the prior art techniques exhibit a much toorestrictive capture range.

It is an object of the invention to provide a method of detectingfrequency errors which operates with a greater capture range than theprior art.

According to the invention, this is possible in the time domain.Well-known problems in the time domain are overcome according to theinvention, thereby speeding up the frequency error detection whileobviating time synchronization because no FFT operation is performed.

The object is achieved in that the phase of an incoming complex signalis calculated with an arctangent function, an unwrap function isproduced from the output signal from the arctangent function, the modulo2π limitation introduced with the arctangent function is removed bymeans of the unwrap function, thereby producing an absolute phaserepresentation, and the frequency error is determined by comparing phaserepresentation values which are shifted predetermined in time.

A feature of the invention is that it exclusively operates in the timedomain, (on time differences between two time instants without awarenessof time synchronization). It is well-known that the phase may bedetermined by arctangent calculation on the in-phase and quadraturecomponents of the signals, but it is also well-known that the arctangentfunction has a range which is limited to ±π modulo 2π, which introducesa non-linearity causing a phase and ambiguity of ±π. The invention isbased on the finding that modulo 2π limitation introduced with thearctangent function can be removed by means of an unwrap function, sothat the frequency error can be determined by comparing phaserepresentation values which are shifted predetermined in time.

The accuracy depends on how the complex signals are coded. The followingdetailed description will give an example where the OFDM signalscomprise a particular preamble which is defined in IEEE P802.11a/D7.0,and will be referred to as “IEEE preamble” below. It has surprisinglybeen found that the absolute phase representation obtained by means ofthe unwrapped function on a signal with the above-mentioned IEEEpreamble is a smooth curve. The smoother the curve, the greater thespeed and accuracy of the frequency error detection of the invention.

In a preferred embodiment, the unwrapped function accumulates k times2π, where k depends on the wrapped function so that k will be increasedby 1 if the difference between the last corrected sample and the currentsample is smaller than −π, and k will be decreased by 1 if thedifference between the last corrected sample and the current sample isgreater than π.

It is important to understand that the principles of the invention maybe applied in general, but that an incoming signal comprising specificdedicated preamble signals and data signals is frequently involved.

The invention also relates to an apparatus for performing the method ofdetecting frequency errors in a receiver.

The apparatus comprises a complex phase calculator for calculating thephase of an incoming complex signal on a sample-by-sample basis of thein-phase and quadrature components of the signal and performing anarctangent function on the in-phase and quadrature components of theincoming signal, a phase unwrap module for removing discontinuities inthe phase if the phase passes the in-phase axes in the complex planewith an absolute value greater than π, and a comparator module arrangedto compare the difference in phase signal values at predetermined timeintervals, the difference in said values representing frequency errorsin the input signal to the complex phase calculator.

It has been found that the best result is achieved when the phase unwrapmodule is inserted between the complex phase calculator and thecomparator module, but it can also be shown that it is possible toinsert the comparator module between the complex phase calculator andthe phase unwrap module. In any case, it is an advantage that the signalprocessing is terminated in a mean estimator circuit.

The invention also relates to a method of designing a complex preamblesignal. It has previously been explained that, on the other hand, theIEEE preamble involves a smooth phase representation but, on the otherhand, the invention teaches that the preamble can be optimized.According to the invention, the optimal preamble may be found byperforming the steps of deciding upon a first preamble signal,performing an arctangent function on a number of sample values of thein-phase and quadrature components of the signal decided upon, decidingupon a second and further different preamble signal, and performing therespective arctangent function, and choosing such a preamble signalwhose smooth curve signal is the smoothest.

A preferred embodiment comprises choosing precisely the preamble signalwhich involves the smallest error in connection with the arctangentfunction being approximated with a sine wave.

Finally, the invention relates to a computer-readable medium comprisinga program for making a computer detect the frequency error of a complexcommunication signal. According to the invention, a program comprisesthe steps as defined in claim 14.

These and other aspects of the invention are apparent from and will beelucidated with reference to the embodiment(s) described hereinafter.

FIG. 1 shows a block diagram of a typical OFDM transmitter according tothe prior art.

FIG. 2 shows an OFDM training structure.

FIG. 3 shows an example of a transmitter and receiver block diagram foran OFDM physical layer (PHY).

FIG. 4 shows in-phase (upper part) and quadrature (lower part)components of 12 IEEE preamble symbols.

FIG. 5 shows a representation of an IEEE preamble phase in a complexplane (upper part) and in a phase domain (lower part).

FIG. 6 shows a possible curve of an unwrap function U_(n).

FIG. 7 shows a wrapped and an unwrapped IEEE preamble phase with α=0.

FIG. 8 shows an IEEE preamble phase with a carrier offset of oneinter-carrier spacing α=1.

FIG. 9 shows a block diagram of a preferred embodiment of a non-linearFrequency Error Detector (FED).

FIG. 10 shows a 16 sample-delayed IEEE preamble phase with no frequencyoffset (α=0), and with Δf=312.5 kHz frequency offset (one inter-carrierspacing, α=1).

FIG. 11 shows an output of a non-linear Frequency Error Detector (FED)for different carrier frequency offsets Δ=0, 1, 3, 7.

FIG. 12 shows a block diagram of the best mode of the invention.

FIG. 13 shows a flow chart of an algorithm used in the best mode of theinvention.

FIG. 14 shows a block diagram of another preferred embodiment of anon-linear Frequency Error Detector (FED).

FIG. 1 illustrates a block diagram of a typical OFDM transmitteraccording to the prior art. Orthogonal frequency division multiplexing(OFDM) is a robust technique for efficiently transmitting data through achannel. The technique uses a plurality of sub-carrier frequencies(sub-carriers) within a channel bandwidth to transmit the data. Thesesub-carriers are arranged for optimal bandwidth efficiency compared tomore conventional transmission approaches, such as frequency divisionmultiplexing (FDM), which wastes large portions of the channel bandwidthin order to separate and isolate the sub-carrier frequency spectra andthereby avoid inter-carrier interference (ICI). By contrast, althoughthe frequency spectra of OFDM sub-carriers overlap significantly withinthe OFDM channel bandwidth, OFDM nonetheless allows resolution andrecovery of the information that has been modulated onto eachsub-carrier. Additionally, OFDM is much less susceptible to data lossdue to multipath fading than other conventional approaches for datatransmission, because inter-symbol interference is prevented through theuse of OFDM symbols that are long in comparison to the length of thechannel impulse response. Also, the coding of data onto the OFDMsub-carriers can take advantage of frequency diversity to mitigate lossdue to frequency-selective fading. The general principles of OFDM signaltransmission can be described with reference to FIG. 1 which is a blockdiagram of a typical OFDM transmitter according to the prior art. AnOFDM transmitter 10 receives a stream of baseband data bits 12 as itsinput. These input data bits 12 are immediately fed into an encoder 14,which takes these data bits 12 in segments of B bits every T_(g)+T_(s)seconds, where T_(s) is an OFDM symbol interval and T_(g) is a cyclicprefix or guard interval. Encoder 14 typically uses a block and/orconvolutional coding scheme to introduce error-correcting and/orerror-detecting redundancy into the segment of B bits and thensub-divides the coded bits into 2N sub-segments of m bits. The integer mtypically ranges from 2 to 6. In a typical OFDM transmission system,there are 2N+1 OFDM sub-carriers, including the zero frequency DCsub-carrier which is not generally used to transmit data since it has nofrequency and therefore no phase. Accordingly, encoder 14 then typicallyperforms 2^(m)-ary quadrature amplitude modulation (QAM) encoding of the2N sub-segments of m bits in order to map the sub-segments of m bits topredetermined corresponding complex-valued points in a 2^(m) -aryconstellation. Each complex-valued point in the constellation representsdiscrete values of phase and amplitude. In this way, encoder 14 assignsto each of the 2N sub-segments of m bits a corresponding complex-valued2^(m)-ary QAM sub-symbol c_(k)=a_(k)+jb_(k), where −N≦k≦N, in order tocreate a sequence of frequency-domain sub-symbols that encodes the Bdata bits. Also, the zero-frequency sub-carrier is typically assignedc₀=0. Encoder 14 then passes the sequence of sub-symbols, along with anyadditional zeroes that may be required for interpolation to simplifyfiltering, onto an inverse discrete Fourier transformer (IDFT) or,preferably, an inverse fast Fourier transformer (IFFT) 16. Uponreceiving the sequence of OFDM frequency-domain sub-symbols from encoder14, IFFT 16 performs an inverse fast Fourier transform on the sequenceof sub-symbols. In other words, it uses each of the complex-valuedsub-symbols, C_(k), to modulate the phase and amplitude of acorresponding one of 2N+1 sub-carrier frequencies over a symbol intervalT_(s). The sub-carriers are given by exp(−2πjf_(k)t), and therefore,have baseband frequencies of f_(k)=(k/T_(s)), where k is the frequencynumber and is an integer in the range −N≦k≦N. IFFT 16 thereby produces adigital time-domain OFDM symbol of duration T_(s) given by:${u(t)} = {{\sum\limits_{k = {- N}}^{N}\quad{c_{k}{\exp\left( {{- 2}\pi\quad{if}_{k}t} \right)}\quad 0}} \leq t \leq T_{s}}$

As a result of this discrete-valued modulation of the OFDM sub-carriersby frequency-domain sub-symbols over symbol intervals of T_(s) seconds,the OFDM sub-carriers each display a sinc x=(sin x)/x spectrum in thefrequency domain. By spacing each of the 2N+1 sub-carriers 1/T_(s) apartin the frequency domain, the primary peak of the sub-carrier of eachsinc x spectrum coincides with a null of the spectrum of every othersub-carrier. In this way, although the spectra of the sub-carriersoverlap, they remain orthogonal to one another. Note that the modulatedsub-carriers fill the channel bandwidth very efficiently. As indicatedon FIG. 1, the digital time-domain OFDM symbols produced by IFFT 16 arethen passed to a digital signal processor (DSP) 18. DSP 18 performsadditional spectral shaping on the digital time-domain OFDM symbols andalso adds a cyclic prefix or guard interval of length T_(g) to eachsymbol. The cyclic prefix is generally just a repetition of part of thesymbol. This cyclic prefix is typically longer than the OFDM channelimpulse response and, therefore, acts to prevent inter-symbolinterference (ISI) between consecutive symbols. The real andimaginary-valued digital components that make up the cyclicallyextended, spectrally-shaped digital time-domain OFDM symbols are thenpassed to digital-to-analog converters (DACs) 20 and 22, respectively.DACs 20 and 22 convert the real and imaginary-valued digital componentsof the time-domain OFDM symbols into in-phase and quadrature OFDM analogsignals, respectively, at a conversion or sampling rate f_(ck) _(—)_(t)as determined by a clock circuit 24. The in-phase and quadratureOFDM signals are then passed to mixers 26 and 28, respectively. Inmixers 26 and 28, the in-phase and quadrature OFDM signals from DACs 20and 22 are used to modulate an in-phase intermediate frequency (IF)signal and a 90°phase-shifted (quadrature) IF signal, respectively, inorder to produce an in-phase IF OFDM signal and a quadrature IF OFDMsignal, respectively. The in-phase IF signal that is fed to mixer 26 isproduced directly by a local oscillator 30, while the 90° phase-shiftedIF signal that is fed to mixer 28 is produced by passing the in-phase IFsignal produced by local oscillator 30 through a 90° phase-shifter 32before feeding it to mixer 28. These two in-phase and quadrature IF OFDMsignals are then combined in combiner 34 to form a composite IF OFDMsignal. In some prior art transmitters, the IF mixing is performed inthe digital domain using a digital synthesizer and digital mixers beforethe digital-to-analog conversion is performed. This composite IF OFDMsignal is then passed into radio frequency (RF) transmitter 40. Manyvariations of RF transmitter 40 exist and are well known in the art, buttypically, RF transmitter 40 includes an IF bandpass filter 42, an RFmixer 44, an RF carrier frequency local oscillator 46, an RF bandpassfilter 48, an RF power amplifier 50, and an antenna 52. RF transmitter40 takes the IF OFDM signal from combiner 34 and uses it to modulate atransmission carrier of frequency f_(fct), generated by RF localoscillator 46, in order to produce an RP OFDM-modulated carrier thatoccupies a channel bandwidth, BW. Because the entire OFDM signal mustfit within this channel bandwidth, the channel bandwidth must be atleast (1/Ts)·(2N+1) Hz wide to accommodate all the modulated OFDMsub-carriers.

FIG. 2 illustrates an OFDM training structure, i.e. a Physical LayerConvergence Procedure (PLCP) preamble, where t₁ to t₁₀ denote shorttraining symbols, and T₁ and T₂ denote long training symbols. The PLCPpreamble is followed by a signal field and data. The total traininglength is 16 μs. The dashed boundaries in FIG. 2 denote repetitions dueto the periodicity of the inverse Fourier transform. A short OFDMtraining symbol consists of 12 sub-carriers, which are modulated bycomplex number elements.

FIG. 3 illustrates an example of a transmitter and receiver blockdiagram for an OFDM physical layer (PHY). The OFDM transmitter andreceiver is further detailed in the IEEE P802.11a/D5.0 standard. Majorspecifications for OFDM PHY are listed in the table below. Informationdata rate 6, 9, 12, 18, 24, 36, 48 and 54 Mbit/s (6, 12 and 24 Mbit/sare mandatory) Modulation BPSK-OFDM QPSK-OFDM 16-QAM-OFDM 64-QAM-OFDMError Correcting Code K-7 (64 states) Convolutional code Coding rate ½,⅔, ¾ Number of sub-carriers 52 OFDM symbol 4.0 μs duration Guardinterval 0.8 μs (T_(G1)) Occupied bandwidth 16.6 MHz

Attention is drawn to the receiver, and in particular the AutomaticFrequency Correction (AFC) Clock Recovery. As indicated in FIG. 3, anyfrequency error or misalignment between the carrier frequency of theincoming signal and an oscillator, is adjusted by an AFC Clock Recoverycircuit. The invention proposed is located in the circuit elements AFCClock Recovery, the oscillator controlled by the AFC Clock Recovery, andthe clock recovery part of the I Q Detect.

The carrier frequency offset estimation, as stated before, is performedin the time domain by defining the phase on a sample-by-sample basis ofthe in-phase and quadrature components. This definition of the phase forevery incoming signal can be seen as a representation of the incomingsignal in the Phase Domain, where the phase domain is defined asfollows:

The phase domain represents on a sample basis the phase between everyin-phase (I(t)) and quadrature (Q(t)) component of the incoming complexsignal (x(t)) as a function of time.

In the phase domain, the subcarrier ambiguity problem will be introducedby the calculation of the phase with the arctangent function on theincoming complex (in-phase, quadrature) samples. The arctangent functionhas a range which is limited to ±π modulo 2π. The modulo 2π of thearctangent function introduces a non-linearity which causes a phaseambiguity of ±π which is due to the subcarrier ambiguity of ±½, as willbe shown in the sequel.

Let the carrier frequency offset be expressed as $\begin{matrix}{{{\Delta\quad f} = {\alpha\frac{1}{{NT}_{s}}}},{\alpha \in R}} & (1)\end{matrix}$with T_(s) the time between two samples, N the number of subcarriers ofthe OFDM signal and NT_(s) the period time of an OFDM symbol, so Eq. (1)shows the carrier frequency offset expressed in a times the intercarrierspacing (1/NT_(s))

If we use the well-known Fourier transform pairX(f−Δf)⇄e ^((j2πΔft)) x(t),   (2)with x(t) the incoming OFDM signal, then Eq. (2) shows that a constantfrequency shift causes a linear increasing phase of the OFDM signalx(t). This linear behavior of the phase can be exploited to estimate, inthe time domain, the carrier frequency offset of x(t). If we want to usethe phase of x(t) we need the arctangent function $\begin{matrix}{{\psi(t)} = {{{2\pi\quad{ft}} + {\arg\left\{ {x(t)} \right\}}} = {{{{\Delta\phi}(t)} + {\Theta(t)}} = {\arctan\left\{ \frac{Q(t)}{I(t)} \right\}\quad{{mod}\left( {2\pi} \right)}}}}} & (3)\end{matrix}$

If we combine Eq. (1) and Eq. (3) we obtain $\begin{matrix}{{\varphi(t)} = {{2\pi\frac{\alpha}{{NT}_{s}}t} + {{\Theta(t)}\quad{{mod}\left( {2\pi} \right)}}}} & (4)\end{matrix}$

Substitution of the OFDM symbol period in Eq. (4) yieldsψ(NT _(s))=α2π+Θ(NT _(s))mod(2π)   (5)

The modulo (2π) part of Eq. (5) limits the value of ψ(NT_(s)) at ±π sothe maximum value of α is then $\begin{matrix}{\alpha_{\max} = {\frac{{\psi\left( {NT}_{s} \right)}_{\max} - {\Theta\left( {NT}_{s} \right)}}{2\pi} = {\pm \left( {\frac{1}{2} - \frac{\Theta\left( {NT}_{s} \right)}{2\pi}} \right)}}} & (6)\end{matrix}$

Eq. (6) shows that the subcarrier ambiguity is introduced by the modulo2π of the arctangent function. This modulo 2π of the arctangent functionis a non-linear operation on ψ(t), so if we want to use the phase ψ(t)we need the arctangent function without the modulo 2π non-linearity.This document describes a non-linear FED which is able to remove thisnon-linearity, this removal is also a non-linear operation on the phase.By removing the modulo 2π limitation, ψ(t) becomes a continuous functionwithout any phase jumps. If we look in the complex plane (in-phasecomponent on x-axes and quadrature component on y-axes) a phase jumpwill occur if the phase moves from the first quadrant to the third orfourth quadrant (or vice versa) with an absolute value larger than π.Thus discontinuities in the phase occur if the phase passes the in-phaseaxes in the complex plane with an absolute value larger than π.

In the further part of this document, the removal of these phase jumpsis called: “phase unwrapping”. This phase unwrapping results in anabsolute phase function Φ(t), which means that the value of the phasemay be, for example, Φ(t)=23.67π and is not limited to the relativevalue of ψ(t)=−0.33π mod(2π). It is this absolute value representationΦ(t) that gives us the wide capture range of the non-linear FED proposedin this document. It will be shown that the capture range of the FED isnot limited anymore by ±½ times the intercarrier spacing (assumingΘ)(NT_(s))/2π equals zero) introduced by the arctangent function.

In the following the phase representation of a discrete OFDM signal withfrequency offset will be described. The discrete OFDM signal$\begin{matrix}{{x_{n}^{\alpha} = {{\sum\limits_{i = {{- \frac{N}{2}} + p}}^{\frac{N}{2} - p}\quad{B_{i}{\mathbb{e}}^{{j2}\quad{\pi{({\frac{i}{{NT}_{s}}\frac{\alpha}{{NT}_{s}}})}}{nT}_{s}}}} = {{\mathbb{e}}^{j\quad\alpha\frac{2\pi}{N}n}{\sum\limits_{i = {{- \frac{N}{2}} + p}}^{\frac{N}{2} - p}\quad{B_{i}{\mathbb{e}}^{j{({i\frac{2\pi}{N}n})}}}}}}},} & (7)\end{matrix}$

in which p is the number of unused subcarriers of the OFDM symbol, B_(i)is a complex signal which represents the initial phase and amplitude ofthe I-th subcarrier and n is the sample index. The phase of x_(n) ^(α)$\begin{matrix}{{\Theta_{n}^{\alpha} = {{\arg\left\{ x_{n}^{\alpha} \right\}} = {{\alpha\frac{2\pi}{N}n} + {\arg\left\{ {\sum\limits_{i = {{- \frac{N}{2}} + p}}^{\frac{N}{2} - p}\quad{B_{i}{\mathbb{e}}^{j{({i\frac{2\pi}{N}n})}}}} \right\}}}}},} & (8)\end{matrix}$is a summation of a linear function of α and the summation of the phasesof the subcarriers. This linear function of a can also be obtained for aspecific discrete OFDM preamble signal, as will be shown in thefollowing where the phase representation of the IEEE P802.11a/D7.0preamble (further referred to as: “IEEE preamble”) is used in W-LAN OFDMsystems. This IEEE W-LAN OFDM system uses the following figures; N=64points (I)FFT, with a sample frequency of F_(s)=20 MHz (T_(s)=50 ns) andp=6 unused subcarriers, substituting these figures in Eq. (7) and Eq.(8) we obtain $\begin{matrix}{{x_{n}^{\alpha} = {{\mathbb{e}}^{j\quad\alpha\frac{\pi}{32}n}{\sum\limits_{i = {- 26}}^{26}\quad{B_{i}{\mathbb{e}}^{j{({i\frac{\pi}{32}n})}}}}}},} & (9)\end{matrix}$for the OFDM signal and $\begin{matrix}{{\Theta_{n}^{\alpha} = {{\alpha\frac{\pi}{32}n} + {\arg\quad\left\{ {\sum\limits_{i = {- 26}}^{26}\quad{B_{i}{\mathbb{e}}^{j{({i\frac{\pi}{32}n})}}}} \right\}}}},} & (10)\end{matrix}$for the phase of the OFDM signal.

The preamble is defined in IEEE P802.11a/D7.0. It is a short OFDM symbolconsisting of 12 subcarriers which are modulated by the elements S_(i)of the sequence given by:S=S _(−i) , . . . ,S _(i){square root}{square root over(13/6)}(0,0,1+j,0,0,0,−1−j,0,0,0,1+j,0,0,0,−1−j,0,0,0,−1−j,0,0,0,1+j,0,0,0,0,0,0,0,−1−j,0,0,0,−1−j,0,0,0,1+j,0,0,0,1+j,0,0,0j1+j,0,0,0,1+j,0,0),i=0,1, . . . ,25,26   (11)with the indexes (−26, . . . ,26) referring to the subcarrier numbers ofthe OFDM symbol. The multiplication by the factor {square root}{squareroot over (13/6)} is needed to normalize the average power because theIEEE preamble only uses 12 out of the 52 subcarriers. It can be seenfrom Eq. (11) that only the subcarriers with an index which is amultiple of four are non-zero, so substitution of m=i/4 in Eq. (9) andexchanging the elements B_(i) with the elements S_(i) yields,$\begin{matrix}{{p_{n}^{\alpha} = {{\sqrt{13/6}{\mathbb{e}}^{{j\alpha}\frac{\pi}{32}n}{\sum\limits_{m = {- 6}}^{6}{S_{m}{\mathbb{e}}^{{jm}\frac{\pi}{8}n}\quad m}}} \neq 0}},} & (12)\end{matrix}$the representation of the IEEE preamble and $\begin{matrix}{{{\overset{\sim}{\phi}}_{n}^{\alpha} = {{{\alpha\frac{\pi}{32}n} + {\arg\quad\left\{ {\sum\limits_{m = {- 6}}^{6}\quad{S_{m}{\mathbb{e}}^{j\quad m\frac{\pi}{8}n}}} \right\}\quad m}} \neq 0}},} & (13)\end{matrix}$the phase of this IEEE preamble. The subcarrier So is equal to zero(DC-subcarrier), so the index m=0 is not used for the IEEE preamble. Eq.(12) shows that if m=±1 the fundamental frequency F₀=1/NT_(S) in theOFDM signal $\begin{matrix}{F_{p} = {{4F_{0}} = {{4\frac{1}{64T_{s}}} = {\frac{1}{16T_{s}}.}}}} & (14)\end{matrix}$

Then the period time or periodicity of the preamble $\begin{matrix}{T_{p} = {\frac{1}{F_{p}} = {{\frac{1}{4}T_{0}} = {16{T_{s}.}}}}} & (15)\end{matrix}$is 16 samples (not 64 as the OFDM signal), so the IEEE preamble has aduration of 16 samples (800 ns).

If we look somewhat closer at the components of the sequence S we seethatS _(m) =−S _(−m) S _(m) e ^(−jβm) +S _(−m) e ^(jβm) =j2S _(m) sin(B_(m))m=1,3,5,   (16)S _(m) =S _(−m) S _(m) e ^(jβm) +S _(−m) e ^(−jβm)=2S _(m) cos(B_(m))m=2,4,6,with βm an arbitrary number. Using this goniometric equality in Eq. (12)yields $\begin{matrix}{{p_{n}^{\pi} = {2\sqrt{13/6}{\mathbb{e}}^{j\quad\alpha\frac{\pi}{32}n}\left\{ {{S_{2}{\cos\left( {2\frac{\pi}{8}n} \right)}} + {S_{4}{\cos\left( {4\frac{\pi}{8}n} \right)}} + {S_{6}{\cos\left( {6\frac{\pi}{8}n} \right)}} + {j\left\lbrack {{S_{1}{\sin\left( {\frac{\pi}{8}n} \right)}} + {S_{3}{\sin\left( {3\frac{\pi}{8}n} \right)}} + {S_{5}{\sin\left( {5\frac{\pi}{8}n} \right)}}} \right\rbrack}} \right\}}},} & (17) \\{{{and}\quad{with}}{S_{1} = {S_{2} = {{- \left( {1 + j} \right)} = {{- \sqrt{2}}{\mathbb{e}}^{j\frac{\pi}{4}}}}}}S_{3} = {S_{4} = {S_{5} = {S_{6} = {\left( {1 + j} \right) = {\sqrt{2}{{\mathbb{e}}^{j\frac{\pi}{4}}.}}}}}}} & (18)\end{matrix}$the representation of the IEEE preamble becomes $\begin{matrix}{p_{n}^{\pi} = {2\sqrt{13/6}{\mathbb{e}}^{j\quad{({{\alpha\frac{\pi}{32}n} + \frac{\pi}{4}})}}{\left\{ {{- {\cos\left( {2\frac{\pi}{8}n} \right)}} + {\cos\left( {4\frac{\pi}{8}n} \right)} + {\cos\left( {6\frac{\pi}{8}n} \right)} + {j\left\lbrack {{- {\sin\left( {\frac{\pi}{8}n} \right)}} + {\sin\left( {3\frac{\pi}{8}n} \right)} + {\sin\left( {5\frac{\pi}{8}n} \right)}} \right\rbrack}} \right\}.}}} & (19)\end{matrix}$

FIG. 4 shows in the upper part the in-phase component and in the lowerpart the quadrature component of the IEEE preamble without carrierfrequency offset (α=0) for 12 IEEE preamble symbols (192 samples on thehorizontal axes).

The phase of the IEEE preamble $\begin{matrix}{{{\overset{\sim}{\phi}}_{n}^{\alpha} = {\frac{\pi}{4} + {\alpha\frac{\pi}{32}n} + \theta_{n}}},{\theta_{n} = {\arctan\left\{ \frac{{- {\sin\left( {\frac{\pi}{8}n} \right)}} + {\sin\left( {3\frac{\pi}{8}n} \right)} + {\sin\left( {5\frac{\pi}{8}n} \right)}}{{- {\cos\left( {2\frac{\pi}{8}n} \right)}} + {\cos\left( {4\frac{\pi}{8}n} \right)} + {\cos\left( {6\frac{\pi}{8}n} \right)}} \right\}}}} & (20)\end{matrix}$is a summation of an initial phase (π/4), a linear changing phase as afunction of the carrier frequency offset $\alpha\frac{\pi}{32}n$and an arctangent function performed on a summation of sinusoids withmultiple frequencies (θ_(n)). The behavior of θ_(n) is not easy todetermine analytically, so it is obtained via simulations and is shownin FIG. 5.

FIG. 5 represents the in-phase and quadrature components for everysample of the IEEE preamble (periodic with 16) in the upper part(complex plane representation) and the arctangent values of the EEEpreamble in the lower part (phase domain representation).

It can be seen from FIG. 5 that a modulo 2π phase correction needs to beperformed between samples 1,2(mod16),6,7(mod16),10,11(mod16) and13,14(mod16), because between these consecutive samples the phase of theIEEE preamble passes the in-phase axes with an absolute value largerthan π.

The 2π phase correction is performed by an unwrap function (U_(n)) andcan be described as follows:

The unwrap function (U_(n)) accumulates k time 2π, where k depends onthe wrapped function to which U_(n)is applied.

-   -   k will be increased by one if the difference between the last        corrected sample and the current sample is smaller than −π.    -   k will be decreased by one if the difference between the last        corrected sample and the current sample is larger than π.

FIG. 6 shows a possible curve of U_(n), every function value U_(n) is amultiple of 2π(k times 2π) and depends on the wrapped function.

Applying the unwrap function Un to the wrapped phase {tilde over(φ)}_(n) ^(α) of the IEEE preamble, shown in FIG. 5, yields$\begin{matrix}{{\phi_{n}^{\alpha} = {\frac{\pi}{4} + {\alpha\frac{\pi}{32}n} + \theta_{n}}},} & (21)\end{matrix}$the unwrapped phase of the IEEE preamble. The wrapped phase {tilde over(φ)}_(n) ⁰ and the unwrapped phase {tilde over (φ)}_(n) ⁰ arerepresented by the solid line and dotted line respectively, in FIG. 7.

It can be seen from FIG. 7 that the unwrapped phase φ_(n) ⁰ behaves likea sinewave. Eq. (21) shows that the sinewave behavior of φ_(n) ^(α) withα=0, is the behavior if θ_(n). If we take a closer look at this sinewavebehavior we are able to determine an approximation of $\begin{matrix}{{\phi_{n} \approx {\frac{7\pi}{4}{\sin\left( {\frac{\pi}{8}n} \right)}}},} & (22)\end{matrix}$and Eq. (21) can be approximated with $\begin{matrix}{\phi_{n}^{\alpha} \approx {\frac{\pi}{4} + {\alpha\frac{\pi}{32}n} + {\frac{7\pi}{4}{{\sin\left( {\frac{\pi}{8}n} \right)}.}}}} & (23)\end{matrix}$

If we look at Eq. 20, we see that the carrier frequency offset gives alinear increase of the phase. If we are able to determine the angle ofdirection of the wrapped phase {tilde over (φ)}_(n) ^(α), then we knowthe frequency offset represented by α. By applying the unwrap functionU_(n) to {tilde over (φ)}_(n) ^(α), we obtain the unwrapped phase {tildeover (φ)}_(n) ^(α) shown by Eq. (21). If we look at FIG. 8, we can seethat the unwrapped phase {tilde over (φ)}_(n) ¹ increases linearly dueto the carrier frequency offset Δf=312.5 kHz of one intercarrier spacing(α=1).

As mentioned earlier, the behavior of θ_(n) is approximated with asinewave, and it can be seen from FIG. 8 that this approximation canalso be used in the case α≠0.

The unwrapping and the subsequent detection of the angle of direction ofthe wrapped phase {tilde over (φ)}_(n) ^(α) are performed by thenon-linear FED and will be described in detail in the following.

The carrier frequency offset estimation, as stated before, is performedin the time domain by defining the phase on a sample-by-sample basis ofthe in-phase and quadrature components without the modulo 2π limitation.The removal of this limitation is performed by the phase unwrapfunction.

If we look at FIG. 8, it can be seen that the angle of direction can bedefined by taking the difference between two function values which areshifted in time and have equal values in the case that there is nocarrier frequency offset (α=0). It can be seen from Eq. 15 and Eq. 23that the periodicity of {tilde over (φ)}_(n) ^(α) and φ_(n) ^(α) equals16, so every two function values which are 16 samples apart from eachother have the same value, as can also be verified graphically in FIG.7. The difference between φ_(n) ^(α)and φ_(n+16) ^(α) is constant forevery n and proportional to the carrier frequency offset. If thisconstant value is contaminated by noise, the influence of this noise canbe decreased by averaging the samples. All of the above mentionedoperations with the signal names are shown in FIG. 9, the block diagramof the non-linear FED.

The signal p_(n) ^(α) described by Eq. 19 and shown in FIG. 4 for α=0 isthe input signal for the “complex phase” block. The output signal of the“complex phase” block is the wrapped phase $\begin{matrix}{{{\overset{\sim}{\phi}}_{n}^{\alpha} = {\frac{\pi}{4} + {\alpha\frac{\pi}{32}n} + \theta_{n}}},\quad{{mod}\left( {2\pi} \right)}} & (24)\end{matrix}$of p_(n) ^(α) and is shown as the solid line in FIG. 7 with no carrierfrequency offset (α=0).

Applying the unwrap function U_(n) to the input signal {tilde over(φ)}_(n) ^(α) yields $\begin{matrix}{{{\phi_{n}^{\alpha} \approx {\frac{\pi}{4} + {\alpha\frac{\pi}{32}n} + {\frac{7\pi}{4}{\sin\left( {\frac{\pi}{8}n} \right)}}}},}\quad} & (25)\end{matrix}$at the output of the “phase unwrap” block. This unwrapped phase signalis shown as the dotted lines in FIG. 7 for α=0 and in FIG. 8 for α=1.

The output signal of the “Z^(−N)” block is the delayed version of theunwrapped phase signal $\begin{matrix}{{{\phi_{n - D}^{\alpha} \approx {\frac{\pi}{4} + {\alpha\frac{\pi}{32}\left( {n - D} \right)} + {\frac{7\pi}{4}\sin\left\{ {\frac{\pi}{8}\left( {n - D} \right)} \right\}}}},}\quad} & (26)\end{matrix}$with D the number of delayed samples. With some goniometric equalities,Eq. 26 can be rewritten as $\begin{matrix}{{\phi_{n - D}^{\alpha} \approx {\frac{\pi}{4} + {\alpha\frac{\pi}{32}\left( {n - D} \right)} + {\frac{7\pi}{4}\left\lbrack {{{\sin\left( {\frac{\pi}{8}n} \right)}{\cos\left( {\frac{\pi}{8}D} \right)}} - {{\cos\left( {\frac{\pi}{8}n} \right)}{\sin\left( {\frac{\pi}{8}D} \right)}}} \right\rbrack}}},} & (27)\end{matrix}$substituting D=16 (the period of the IEEE preamble) in Eq. 27 yields$\begin{matrix}{{{\phi_{n - 16}^{\alpha} \approx {{\left( {1 - {2\alpha}} \right)\frac{\pi}{4}} + {\alpha\frac{\pi}{32}n} + {\frac{7\pi}{4}{\sin\left( {\frac{\pi}{8}n} \right)}}}},}\quad} & (28)\end{matrix}$and is shown in FIG. 10 for α=0 and α=1.

The output signal of the “subtract” block is the unwrapped phasedifference signal${{{\Delta\phi}_{n - D}^{\alpha} \approx {\frac{\pi}{4} + {\alpha\frac{\pi}{32}n} + {\frac{7\pi}{4}{\sin\left( {\frac{\pi}{8}n} \right)}} - \quad\left\lbrack {\frac{\pi}{4} + {\alpha\frac{\pi}{32}\left( {n - D} \right)} + {\frac{7\pi}{4}\sin\left\{ {\frac{\pi}{8}\left( {n - D} \right)} \right\}}} \right\rbrack}}\quad = {{\alpha\frac{\pi}{32}D} + {\frac{7\pi}{4}\left\{ {{\left\lbrack {1 - {\cos\left( {\frac{\pi}{8}D} \right)}} \right\rbrack{\sin\left( {\frac{\pi}{8}n} \right)}} + {{\sin\left( {\frac{\pi}{8}D} \right)}{\cos\left( {\frac{\pi}{8}n} \right)}}} \right\}}}},$and for D=16 Eq. 29 becomes $\begin{matrix}{{{\Delta\phi}_{n - 16}^{\alpha} \approx {\alpha\frac{\pi}{2}}},} & (30)\end{matrix}$

The sinewave behavior in the beginning of the curve is a switch-onphenomenon because the first 16 samples of φ_(n−16) ^(α) are equal tozero. These first 16 samples cannot be used for the detection of thecarrier frequency offset, so in the case of the IEEE OFDM system, only144 out of the 160 samples can be used.

The output signal of the “mean estimator” block is the unwrapped phasedifference signal average with a sliding window of 144 samples. The meanestimator takes the sum of the last 144 samples and divides this numberby 144. The output of the mean estimator, also the FED output, is shownin FIG. 11 for different values of α=0, 1, 3, 7.

The value of the 160^(th) sample (sample number 159) is the exactrepresentation of the carrier frequency offset, because the switch-onphenomenon has no influence on that sample anymore.

The unwrap function Un increases or decreases the 2π counter k dependingon the phase difference between the last corrected sample and thecurrent sample. If this phase difference is larger than the absolutevalue |π| due to carrier frequency offset (large α), noise or any othercause than the arctangent function, the FED will not be able to correctthis. This limitation is the capture range of the non-linear FED and canbe obtained by finding the n, whereby φ_(n) ^(α=0), shows a maximumphase change $\begin{matrix}{{{\left. {\max\limits_{n}\left\{ \frac{\mathbb{d}\phi_{n}^{\alpha}}{\mathbb{d}n} \right._{\alpha = 0}} \right\} \approx {\max\limits_{n}\left\{ {\frac{7\pi^{2}}{32}{\cos\left( {\frac{\pi}{8}n} \right)}} \right\}}} = \frac{7\pi^{2}}{32}},{{{for}\quad n} = {0\quad{{mod}(8)}}}} & (31)\end{matrix}$substituting this in Eq. 29 with D=1 (consecutive samples) gives,$\begin{matrix}{{{\Delta\phi}_{0,1}^{\alpha_{\max}} \approx {{\alpha_{\max}\left( \frac{\pi}{32} \right)} + {\frac{7\pi}{4}{\sin\left( \frac{\pi}{8} \right)}}}} = {{\pi\left\lbrack {\frac{\alpha_{\max}}{32} + {\frac{7}{4}{\sin\left( \frac{\pi}{8} \right)}}} \right\rbrack}.}} & (32)\end{matrix}$

With the limitation of ±π between two consecutive samples, the capturerange amax will then be $\begin{matrix}{{{\pi\left\lbrack {\frac{\alpha_{\max}}{32} + {\frac{7}{4}{\sin\left( \frac{\pi}{8} \right)}}} \right\rbrack} = \left. {\pm \pi}\Rightarrow{\alpha_{\max} \approx {\pm {32\left\lbrack {1 - {\frac{7}{4}{\sin\left( \frac{\pi}{8} \right)}}} \right\rbrack}} \approx {\pm 10}} \right.},} & (33)\end{matrix}$this number is not the exact capture range due to the approximation bythe sinewave. It can be seen from Eq. 33 that the capture range islimited by the maximum phase jump in the sinewave part of φ_(n) ^(α).This phase jump between two consecutive samples can be decreased by i.aoversampling. This oversampling increases the capture range. A factor oftwo oversampling yields $\begin{matrix}{{\alpha_{\max} \approx {\pm {64\left\lbrack {1 - {\frac{7}{4}{\sin\left( \frac{\pi}{16} \right)}}} \right\rbrack}} \approx {\pm 42}},} & (34)\end{matrix}$this number is not the exact capture range due to the approximation bythe sinewave.

The theoretical figures obtained, until now, for the non-linear FED withthe IEEE preamble are:

Output value is${{\Delta\quad\phi_{n,16}^{\alpha}} \approx {\alpha\frac{\pi}{2}}},$

Capture range without oversampling is: α_(max)≈±10(Δf_(max)≈±3.2 MHz)

Capture range with oversampling by 2 is: α_(max)≈±42(Δf_(max)≈±13.1 MHz)

FIG. 12 illustrates a block diagram of the best mode of the invention.An OFDM signal 1201 is connected to an input on a Frequency Offset toVoltage Converter 1202. An output signal 1203 on the Frequency Offset toVoltage Converter 1202 is connected to an input on an Analogue toDigital Converter 1204. An output data bus 1205 on the Analogue toDigital Converter 1204 is connected to an input data bus on an InputBuffer 1206. An output data bus 1207 on the Input Buffer 1206 isconnected to an input data bus on a Microprocessor 1208. An output databus 1209 on the Microprocessor 1208 is connected to an input data bus onan Output Buffer 1210. An output data bus 1211 on the Output Buffer 1210is connected to a Digital to Analogue Converter 1212. An output signal1213 on the Digital to Analogue Converter 1212 is connected to anOscillator 1215. An output signal 1216 on the Oscillator 1215 isconnected to an input on the Frequency Offset to Voltage Converter 1202.An Accumulator Register 1214 is included in the Microprocessor 1208.

The OFDM signal 1201 is received by an OFDM signal receiver (not shown)for normal signal reception and detection in accordance with commonpractice. The OFDM receiver is currently adjusted for frequency errorswith respect to the incoming OFDM signal 1201. The frequency errordetection and correction is performed in accordance with a novel methodby this invention. According to this novel method, the OFDM signal 1201is fed to a detector 1202 which produces an offset voltage on the output1203, if the oscillator signal 1216 has a frequency offset with respectto the carrier frequency of the incoming signal 1201. The offset voltage1203 is converted into a digital value 1205 which is currentlysupervised by a microprocessor 1208. In the evidence of the digitalvalue 1205 exceeding predefined maximum or minimum values representing aphase offset of ±π, the microprocessor will adjust the oscillator phaseto its opposite minimum or maximum value, and keep track of the amountof phase corrected for in an internal accumulator register 1214. Thismeans that if the phase exceeds +π, the phase will be corrected to −π,and if the phase exceeds −π the phase will be corrected to +π. Thecorrection is done by the microprocessor 1208 by writing a digital valueto the output buffer 1210, which is converted 1212 to a voltage which inturn offsets the Oscillator 1215. The offset value represents a phasecorrection of ±π. In this way the system is able to keep tracking, withfrequency offsets going far beyond the ±π limitation of the detector1202. The actual unwrapped phase is then a value which is currentlystored in a computer, and the wrapped phase is the value at the detector1202.

FIG. 13 illustrates a flow chart of an algorithm used in the best modeof the invention. The algorithm is implemented as a program in theMicroprocessor 1208 indicated in FIG. 12. A Read Operation 1301 isfollowed by a Check 1302. The Check 1302 is followed by an Increment1303. The Check 1302 is also followed by a Decrement 1304. The Increment1303 is followed by a Calculation 1305. The Decrement 1304 is followedby the Calculation 1305. The Check 1302 is also followed by theCalculation 1305. The Calculation 1305 is followed by a Write Operation1306.

The Input Buffer 1206 in FIG. 12 is read by the Read Operation 1301. Ifthe value read represents a phase offset below −π, the Accumulator 1214in FIG. 12 is incremented by 2π by the Increment 1303. If the value readrepresents a phase offset above +π, the Accumulator 1214 in FIG. 12 isdecremented by 2π by the Decrement 1304. If the value read represents aphase offset between −π and +π, the Accumulator 1214 in FIG. 12 isneither incremented nor decremented. Regardless of the operationsperformed on the Accumulator 1214, the value to be written to the OutputBuffer 1210 in FIG. 12 is calculated 1305 as the read value from theInput Buffer 1206 plus the value in the Accumulator 1214. The OutputBuffer 1210 is then set to the calculated value by a Write Operation1306.

FIG. 14 illustrates another preferred embodiment of the invention. Theposition of the “phase-unwrap” block in the model used is changed withrespect to the block diagram of the non-linear FED shown in FIG. 9. The“phase-unwrap” block is moved from just after the “complex phase” block,see FIG. 9, to just after the “subtract” block, so the unwrap functionU_(n) is applied to the phase difference signal instead of the wrappedphase signal {tilde over (φ)}_(n) ^(α.)

1. A method of detecting frequency errors in a receiver, characterizedin that the phase of an incoming complex signal is calculated with anarctangent function, an unwrap function is produced from the outputsignal from the arctangent function, the modulo 2π limitation introducedwith the arctangent function is removed by means of the unwrap function,thereby producing an absolute phase representation, and the frequencyerror is determined by comparing phase representation values which areshifted predetermined in time.
 2. A method according to claim 1,characterized in that the unwrap function accumulates k times 2π, wherek depends on the wrapped function so that k will be increased by 1 ifthe difference between the last corrected sample and the current sampleis smaller than −π and k will be decreased by 1 if the differencebetween the last corrected sample and the current sample is greater thanπ.
 3. A method according to claim 1, characterized in that the comparedphase representation values that are shifted predetermined in time.
 4. Amethod according to claim 1, characterized in that the phase of theincoming complex signal is calculated on a sample-by-sample basis of thein-phase and quadrature components of the signal.
 5. A method accordingto claim 1, characterized in that the incoming signal comprisesspecific, discrete preamble signals and data signals.
 6. A methodaccording to claim 5, characterized in that the incoming signal ismodulated according to OFDM.
 7. A method according to claim 5,characterized in that the incoming signal is modulated according toCPFSK.
 8. An apparatus for performing the method of claim 1,characterized in that the apparatus comprises a complex phase calculatorfor calculating the phase of an incoming complex signal on asample-by-sample basis of the in-phase and quadrature components of thesignal and performing an arctangent function on the in-phase andquadrature components of the incoming signal, a phase unwrap module forremoving discontinuities in the phase if the phase passes the in-phaseaxes in the complex plane with an absolute value greater than π, and acomparator module arranged to compare the difference in phase signalvalues at predetermined time intervals, the difference in said valuesrepresenting frequency errors in the input signal to the complex phasecalculator.
 9. An apparatus according to claim 8, characterized in thatthe phase unwrap module is inserted between the complex phase calculatorand the comparator module.
 10. An apparatus according to claim 8,characterized in that the comparator module is inserted between thecomplex phase calculator and the phase unwrap module.
 11. An apparatusaccording to claim 8, characterized by a mean estimator circuit arrangedto receive the output signal representing the frequency error.
 12. Amethod of designing a complex preamble signal, comprising the steps ofdeciding upon a first preamble signal, performing an arctangent functionon a number of sample values of the in-phase and quadrature componentsof the signal decided upon, deciding upon a second and further differentpreamble signal and performing the respective arctangent function,choosing such a preamble signal whose arctangent curve is the smoothest.13. A method according to claim 12, characterized by choosing preciselythe preamble signal which involves the smallest error in connection withthe arctangent function being approximated with a sine wave.
 14. Acomputer-readable medium comprising a program for making a computer(1208) detect the frequency error of a complex communication signal,characterized in that the program comprises the steps of reading aninput buffer (1206, 1301), and determining (1302) if the input buffer(1206, 1301) contains a value (1301) within a range corresponding toanother range detectable by a frequency error detector (1202), and ifthe value (1301) outside the range resulting in the corresponding otherrange is outside the detectable range by the frequency error detector(1202), the program adjusts an accumulator (1214) by adding (1303, 1304)the negated value multiplied by two to the accumulator (1214, 1303,1304) and calculates (1305) a value to an output buffer (1210, 1306) asthe input buffer (1206, 1301) plus the accumulator value (1214), andwrites the output buffer value (1306) to the output buffer (1210, 1306).